import request from '../../utils/request'

/**
 * 分页查询船公司
 *
 * @param berthing
 * @param airlineCode
 * @param page
 */
export async function getListForPage({ berthing, airlineCode, page }) {
	return request(apiPath.mc + "/api/berthingCompany", {
		method: 'get',
		data: { berthing, airlineCode, page: page.page, size: page.size }
	});
}

/**
 * 根据id获取船公司
 *
 * @param id
 */
export async function getBerthingCompanyById({ id }) {
	return request(apiPath.mc + "/api/berthingCompany/" + id, {
		method: 'get'
	});
}

/**
 * 新增船公司
 *
 * @param data
 */
export async function addBerthingCompany(data) {
	return request(apiPath.mc + "/api/berthingCompany", {
		method: 'post',
		data
	});
}

/**
 * 更新船公司
 *
 * @param data
 */
export async function updateBerthingCompany(data) {
	return request(apiPath.mc + "/api/berthingCompany", {
		method: 'put',
		data
	});
}


/**
 * 根据id删除船公司
 *
 * @param id
 */
export async function deleteBerthingCompanyById({ id }) {
	return request(apiPath.mc + "/api/berthingCompany/" + id, {
		method: 'delete'
	});
}

/**
 * 查询船公司List
 *
 */
export async function getAllBerthingCompanys(){
	return request(apiPath.mc + "/api/berthingCompany/all",{
		method:'get'
	});
}
	